@using MVC.Models;
@model IEnumerable<Product>

@{
    Layout=null;
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品管理</title>
    <link rel="stylesheet" href="~/css/base.css">
</head>
<body>
    <div>
        <div>
            <input type="text" placeholder="请输入要查询的关键字"  id="keyword"><input type="button" value="搜索" id="btnQuery">

        </div>
        <div>
            
            <table class="tbData">
                <tr>
                    <th>Id</th>
                    <th>商品名称</th>
                    <th>供应商名称</th>
                    <th>价格</th>
                    <th>库存数量</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>

                @foreach (var item in Model)
                {
                     <tr id="tbRow">
                    <td>@item.Id</td>
                    <td>@item.ProductName</td>
                    <td>@item.Supplier</td>
                    <td>@item.Price</td>
                    <td>@item.Stock</td>
                    <td>@item.Remarks</td>
                    <td>
                        <input type="button" onclick="btnEdit(@item.Id)" value="编辑" id="btnEdit">
                        <input type="button" onclick="btnDel(@item.Id)" value="删除" id="btnDel">
                    </td>
                </tr>
                }
               
            </table>
        </div>
    </div>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>
</html>